
var key = "ydsecret://query/key/B*RGygVywfNBwpmBaZg*WT7SIOUP2T0C9WHMZN39j^DAdaZhAnxvGcCY6VYFwnHl"
var iv = "ydsecret://query/iv/C@lZe2YzHtZ2CYgaXKSVfsb7Y4QWHjITPPZ0nQp87fBeJ!Iv6v^6fvi2WN@bYpJ4"

function T(e){
    return crypto.createHash("md5").update(e).digest()
}

function decrypt_youdao(e,t,o){
    if (!e)
        return null;
    const a = Buffer.alloc(16, T(t))
      , n = Buffer.alloc(16, T(o))
      , r = crypto.createDecipheriv("aes-128-cbc", a, n);
    let l = r.update(e, "base64", "utf-8");
    return l += r.final("utf-8"),
    l
}


const crypto = require('crypto');   //别写成crypto-js了
const d = "fanyideskweb";
const u = "webfanyi"
//暂时写死
var t = 'fsdsogkndfokasodnaso'
function get_ts(){
    return (new Date).getTime();
}

function get_sign(e, t) {
    return _(`client=${d}&mysticTime=${e}&product=${u}&key=${t}`)
}

function _(e){
    var x=0;
    return crypto.createHash("md5").update(e.toString()).digest("hex")
}
